import { defineStore } from "pinia";
import { ref } from "vue";
import { getBlogSettings } from "@/api/frontend/blogSettings";


export const useBlogSettingsStore = defineStore('blogSettings', () => {
  const blogSettings = ref({})  //blog设置信息
  const getBlogSettingsData = async () => {   //从服务端获取blogSettings
    const res = await getBlogSettings()
    if(res.success){
      blogSettings.value = res.data
      // console.log(blogSettings.value) 
    }
  }
  return {
    blogSettings,
    getBlogSettingsData
  }
})
